package com.education.api.controller.admin.education;

import com.education.business.service.education.ExamInfoService;
import com.education.common.constants.CacheKey;
import com.education.common.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class StudentAnswerController {
    @Autowired
    private ExamInfoService examInfoService;
    /**
     * 获取学员试卷试题列表
     * @param studentId
     * @param
     * @return
     */

    @GetMapping("getStudentExamQuestionAnswerList/{studentId}")
//    @Cacheable(cacheNames = CacheKey.EXAM_CACHE, key = "#studentId + ':' + #examInfoId")
    public Result getExamQuestionList(@PathVariable Integer studentId) {
        return Result.success(examInfoService.selectStudentExamQuestionAnswer(studentId));
    }
}
